{__NOLAYOUT__}
<div toplayer="1" class="prompt-pop pop-style3" style="z-index:{$zindex};width:800px;" id="<?php echo $funcid;?>" url="<?php echo U('Goods/index'); ?>">

    <div class="title">
        <span class="pop-name"><?php echo $search[id]?'编辑':'新增'; ?>仓库货品信息</span>
        <a href="javascript:void(0);" onclick="$(this).parents('.prompt-pop').remove();_asr.closePopup('{$funcid}');" class="close iconfont">&#xe60d;</a>
    </div>



    <div class="pop-scroll">
        <div class="screening ">
            <form enctype="multipart/form-data" action="<?php echo U('Goods/index?func=save'); ?>" id="<?php echo "$funcid"; ?>-Search" method="post">
            <input type="hidden" name="<?php echo "$funcid"; ?>-last-url" id="<?php echo "$funcid"; ?>-last-url" value="<?php echo $__last_url; ?>" />
            <input type="hidden" name="funcid" value="<?php echo "$funcid"; ?>" />
            <input type="hidden" name="pfuncid" value="<?php echo "$pfuncid"; ?>" />
            <input type="hidden" name="id" value="<?php echo $search["id"]; ?>" />
            <input type="hidden" name="_lastchanged" value="<?php echo $search["lastchanged"]; ?>" />
            <ul class="form form-mod-new form-column2">

                <li>
                    <div class="unit-left">货品分类 <em class="abe-red"></em></div>
                    <div class="unit-mid">
                        <div class="popup">
                            <input  type="text" class="pbtxt txt0" name="customer_parent_name" readonly="readonly" value="<?php echo $search['customer_parent_name']; ?>">
                            <button type="submit" class="txt-search" onclick="return _asr.popup('Goods','<?php echo $funcid; ?>','<?php echo $funcid; ?>-Search','Single','customer_parent_id','customer_parent_name'); "><i class="iconfont">&#xe60e;</i></button>
                            <button type="submit" class="txt-clear" onclick="_asr.setvaluebyname('<?php echo "$funcid"; ?>-Search','customer_parent_id','');_asr.setvaluebyname('<?php echo "$funcid"; ?>-Search','customer_parent_name','');return false;" style="display:none"><i class="iconfont">&#xe616;</i></button>
                        </div>
                        <div class="prompt" style="display:none">
                            <div class="error"><i class="iconfont">&#xe616;</i></div>
                        </div>
                    </div>
                </li>

                <li>
                    <div class="unit-left"><span class="tit"> 货品编码<em class="abe-red mrg_5">*</em></span></div>
                    <div class="unit-mid">
                        <div class="textbox">
                            <input type="text" class="pbtxt txt0" name="goods_no"  value="<?php echo $search['goods_no']; ?>"  >
                        </div>
                        <div class="prompt" style="display:none">
                            <div class="error"><i class="iconfont">&#xe616;</i></div>
                        </div>
                    </div>
                </li>
                <li>
                    <div class="unit-left"><span class="tit"> 客户货品<em class="abe-red mrg_5">*</em></span></div>
                    <div class="unit-mid">
                        <div class="textbox">
                            <input type="text" class="pbtxt txt0" name="org_goods_no"  value="<?php echo $search['org_goods_no']; ?>"  >
                        </div>
                        <div class="prompt" style="display:none">
                            <div class="error"><i class="iconfont">&#xe616;</i></div>
                        </div>
                    </div>
                </li>
                <li>
                    <div class="unit-left"><span class="tit"> 货品名称<em class="abe-red mrg_5">*</em></span></div>
                    <div class="unit-mid">
                        <div class="textbox">
                            <input type="text" class="pbtxt txt0" name="name"  value="<?php echo $search['name']; ?>"  >
                        </div>
                        <div class="prompt" style="display:none">
                            <div class="error"><i class="iconfont">&#xe616;</i></div>
                        </div>
                    </div>
                </li>
                <li>
                    <div class="unit-left"><span class="tit"> 助记码<em class="abe-red mrg_5">*</em></span></div>
                    <div class="unit-mid">
                        <div class="textbox">
                            <input type="text" class="pbtxt txt0" name="prefix"  value="<?php echo $search['prefix']; ?>"  >
                        </div>
                        <div class="prompt" style="display:none">
                            <div class="error"><i class="iconfont">&#xe616;</i></div>
                        </div>
                    </div>
                </li>
                <li>
                    <div class="unit-left"><span class="tit"> 规格</span></div>
                    <div class="unit-mid">
                        <div class="textbox">
                            <input type="text" class="pbtxt txt0" name="style_info"  value="<?php echo $search['style_info']; ?>"  >
                        </div>
                        <div class="prompt" style="display:none">
                            <div class="error"><i class="iconfont">&#xe616;</i></div>
                        </div>
                    </div>
                </li>
                <li>
                    <div class="unit-left"><span class="tit"> 材质</span></div>
                    <div class="unit-mid">
                        <div class="textbox">
                            <input type="text" class="pbtxt txt0" name="materials"  value="<?php echo $search['materials']; ?>"  >
                        </div>
                        <div class="prompt" style="display:none">
                            <div class="error"><i class="iconfont">&#xe616;</i></div>
                        </div>
                    </div>
                </li>
                <li>
                    <div class="unit-left"><span class="tit"> 注册商标</span></div>
                    <div class="unit-mid">
                        <div class="textbox">
                            <input type="text" class="pbtxt txt0" name="brand"  value="<?php echo $search['brand']; ?>"  >
                        </div>
                        <div class="prompt" style="display:none">
                            <div class="error"><i class="iconfont">&#xe616;</i></div>
                        </div>
                    </div>
                </li>
                <li>
                    <div class="unit-left"><span class="tit"> 货品产地</span></div>
                    <div class="unit-mid">
                        <div class="textbox">
                            <input type="text" class="pbtxt txt0" name="producing_area"  value="<?php echo $search['producing_area']; ?>"  >
                        </div>
                        <div class="prompt" style="display:none">
                            <div class="error"><i class="iconfont">&#xe616;</i></div>
                        </div>
                    </div>
                </li>
                <li>
                    <div class="unit-left"><span class="tit"> 规格编码</span></div>
                    <div class="unit-mid">
                        <div class="textbox">
                            <input type="text" class="pbtxt txt0" name="style_code"  value="<?php echo $search['style_code']; ?>"  >
                        </div>
                        <div class="prompt" style="display:none">
                            <div class="error"><i class="iconfont">&#xe616;</i></div>
                        </div>
                    </div>
                </li>
                <li>
                    <div class="unit-left"><span class="tit"> 数量单位</span></div>
                    <div class="unit-mid">
                        <div class="textbox">
                            <input type="text" class="pbtxt txt0" name="uom_qty"  value="<?php echo $search['uom_qty']; ?>"  >
                        </div>
                        <div class="prompt" style="display:none">
                            <div class="error"><i class="iconfont">&#xe616;</i></div>
                        </div>
                    </div>
                </li>
                <li>
                    <div class="unit-left"><span class="tit"> 重量单位</span></div>
                    <div class="unit-mid">
                        <div class="textbox">
                            <input type="text" class="pbtxt txt0" name="uom_weight"  value="<?php echo $search['uom_weight']; ?>"  >
                        </div>
                        <div class="prompt" style="display:none">
                            <div class="error"><i class="iconfont">&#xe616;</i></div>
                        </div>
                    </div>
                </li>
                <li>
                    <div class="unit-left"><span class="tit"> 散件单位</span></div>
                    <div class="unit-mid">
                        <div class="textbox">
                            <input type="text" class="pbtxt txt0" name="uom_bulkcargo"  value="<?php echo $search['uom_bulkcargo']; ?>"  >
                        </div>
                        <div class="prompt" style="display:none">
                            <div class="error"><i class="iconfont">&#xe616;</i></div>
                        </div>
                    </div>
                </li>
                <li>
                    <div class="unit-left">活跃等级</div>
                    <div class="unit-mid">
                        <div class="dropdown">
                            <select class="pbsele dropdown0" name="active"  >
                                <option value="0" <?php if($search['active'] == 0) { ?>selected="selected"<?php } ?>>滞销</option>
                                <option value="1" <?php if($search['active'] == 1) { ?>selected="selected"<?php } ?>>平常</option>
                                <option value="2" <?php if($search['active'] == 2) { ?>selected="selected"<?php } ?>>活跃</option>
                                <option value="3" <?php if($search['active'] == 3) { ?>selected="selected"<?php } ?>>畅销</option>
                            </select>
                        </div>
                        <div class="prompt" style="display:none">
                            <div class="error"><i class="iconfont">&#xe616;</i></div>
                        </div>
                    </div>
                </li>
                <li class="per100">
                    <div class="unit-left"> 图像</div>
                    <div class="unit-mid">
                        <div class="textbox">
                            <div class="textbox">
                                <input type="text" readonly class="pbtxt txt0" id="<?php echo $funcid;?>_import" onclick="$('#<?php echo $funcid;?>_import_file').click();" value=""  verify="" tips="" reglux="" />
                                <input type="file" name="img" style="display: none;" id="<?php echo $funcid;?>_import_file" onchange="<?php echo $funcid;?>_choose();" />
                            </div>
                        </div>
                        <div class="prompt" style="display:none">
                            <div class="error"><i class="iconfont">&#xe616;</i></div>
                        </div>
                    </div>
                    <div class="unit-right">
                        <a href="javascript:void(0);" onclick="$('#<?php echo $funcid;?>_import').click();">选择图片</a>
                    </div>
                </li>
                <li>
                    <div class="unit-left">状态 <em class="abe-red">*</em></div>
                    <div class="unit-mid">
                        <div class="dropdown">
                            <select class="pbsele dropdown0" name="status"  >
                                <option value="0" <?php if($search['status'] == 0) { ?>selected="selected"<?php } ?>>无效</option>
                                <option value="1" <?php if($search['status'] == 1) { ?>selected="selected"<?php } ?>>有效</option>
                                <option value="2" <?php if($search['status'] == 2) { ?>selected="selected"<?php } ?>>缺货</option>
                            </select>
                        </div>
                        <div class="prompt" style="display:none">
                            <div class="error"><i class="iconfont">&#xe616;</i></div>
                        </div>
                    </div>
                </li>
            </ul>
            </form>
        </div>
    </div>
    <div class="pop-sub abe-txtc" >


        <input type="button" value="提交" class="btn btn-blue mrg_10 " onclick="return _asr.submit('<?php echo "$funcid"; ?>', '<?php echo "$funcid"; ?>-Search', '<?php echo U("/Home/Goods/index?func=save&id=$search[id]") ; ?>',''); " />

        <input type="button" value="取消" class="btn btn-org mrg_10 " onclick="$(this).parents('.prompt-pop').remove();_asr.closePopup('{$funcid}');" />
    </div>




</div>

<script>
    function <?php echo $funcid; ?>_chooseDate(o) {
        if($('.date').length>0)
            pickmeup('.date').destroy();
        $('.date').removeClass('date')
        $(o).addClass('date');
        pickmeup('.date', {
            format  : 'Y-m-d',
            date : $(o).val(),
            hide_on_select : true,
            locale : 'zh'
        }).show();
    }

    $('.calendar0,.calendar1').on('click',function(){
    <?php echo $funcid; ?>_chooseDate(this)
    });


    /***************************************************************************************/
    /* 前台页面初始化                                                                      */
    /***************************************************************************************/
    function <?php echo $funcid; ?>_init(_id){
        return ;
    }

    /***************************************************************************************/
    /* 前台页面清除                                                                      */
    /***************************************************************************************/
    function <?php echo $funcid; ?>_clearsearch(_frm){

        _asr.setvaluebyname(_frm,"type", "" );
        _asr.setvaluebyname(_frm,"category_code", "" );
        _asr.setvaluebyname(_frm,"code", "" );
        _asr.setvaluebyname(_frm,"name", "" );
        _asr.setvaluebyname(_frm,"full_name", "" );
        _asr.setvaluebyname(_frm,"prefix", "" );
        _asr.setvaluebyname(_frm,"industry_code", "" );
        _asr.setvaluebyname(_frm,"province", "" );
        _asr.setvaluebyname(_frm,"address", "" );
        _asr.setvaluebyname(_frm,"postcode", "" );
        _asr.setvaluebyname(_frm,"phone", "" );
        _asr.setvaluebyname(_frm,"mobile", "" );
        _asr.setvaluebyname(_frm,"linkman", "" );
        _asr.setvaluebyname(_frm,"invoice_company", "" );
        _asr.setvaluebyname(_frm,"invoice_address", "" );
        _asr.setvaluebyname(_frm,"invoice_phone", "" );
        _asr.setvaluebyname(_frm,"invoice_bank", "" );
        _asr.setvaluebyname(_frm,"invoice_taxno", "" );
        _asr.setvaluebyname(_frm,"invoice_account", "" );
        _asr.setvaluebyname(_frm,"CorpBusiCode", "" );
        _asr.setvaluebyname(_frm,"CorpTaxCode", "" );
        _asr.setvaluebyname(_frm,"LegalPerName", "" );
        _asr.setvaluebyname(_frm,"LegalPerIdType", "" );
        _asr.setvaluebyname(_frm,"LegalPerIdNo", "" );
        _asr.setvaluebyname(_frm,"ContactName", "" );
        _asr.setvaluebyname(_frm,"ContactIdType", "" );
        _asr.setvaluebyname(_frm,"ContactIdNo", "" );
        _asr.setvaluebyname(_frm,"ContactMobile", "" );
        _asr.setvaluebyname(_frm,"OpenBank", "" );
        _asr.setvaluebyname(_frm,"OpenAcctNo", "" );
        _asr.setvaluebyname(_frm,"OpenAcctName", "" );
        _asr.setvaluebyname(_frm,"chinapay_userid", "" );
        _asr.setvaluebyname(_frm,"customer_level", "" );
        _asr.setvaluebyname(_frm,"remarks", "" );


        $("#{$funcid}").find(".selebtn").each(function(){
            $(this).find("a:eq(0)").click();
        });

        $("#{$funcid} .city-tags-new .sele-remove").click();
    }

    function <?php echo $funcid;?>_callback(param){
        _asr.closePopup('{$funcid}');
    }

    function <?php echo $funcid;?>_choose(){
        $('#<?php echo $funcid;?>_import').val($('#<?php echo $funcid;?>_import_file').val())
    }


    {:W('Summary/javascript',array('Goods'))}

</script>

